< previous page page_823 next page >

Page 823
        On Error Resume Next
        ws.BeginTrans
        db.Execute strSQLDelete
        db.Execute strSQLTemp
        db.Execute strSQLUpdate
        db.Execute strSQLInsert
        db.Execute strSQLDrop
        '
        If Err.Number = 0 Then
            ws.CommitTrans
        Else
            ws.Rollback
            MsgBox "Unable to complete transaction", vbExclamation, "Copy All"
        End If
        '
        db.Close
        ws.Close
        Set db = Nothing
        Set ws = Nothing
        '
        accLoadLists
    End If
    '
End Sub
The last routine you need to add is the one for the Set Level button. This routine calls another small form that you build next. The second form is where you set the access level for the selected rights object. Create a new subroutine called accSetLevel and add the code in Listing 21.28.
Type.gifListing 21.28. The accSetLevel routine.
Public Sub accSetLevel()
    '
    ' set user access level
    '
    Dim strRightsName As String
    '
    strRightsName = lblUserID & " ["
    strRightsName = strRightsName & dtaUserID.Recordset.Fields("Object") & "]"
    intRights = dtaUserID.Recordset![Level]
    '
    frmRights.fraRights = strRightsName
    frmRights.Caption = "User Access Rights"
    '
    frmRights.Show vbModal
    '
    ' update object rights
    With dtaUserID.Recordset
        .Edit
        .Fields("[Level]") = intRights
        .Update
continues

 
< previous page page_823 next page >

If you like this book, buy it!